<!DOCTYPE>
<html lang="zh-cn">
	<head>
  		<meta charset="utf-8">
      	<meta http-equiv="X-UA-Compatible" content="IE=edge">
      	<link rel="shortcut icon" href="favicon.ico"/>
      	<title>商品列表 - {$CONF['mallTitle']}</title>
      	<meta name="keywords" content="{$CONF['mallKeywords']}" />
      	<meta name="description" content="{$CONF['mallDesc']},商品分类展示,搜索" />
      	<link rel="stylesheet" href="__ROOT__/Apps/Home/View/default/css/common.css" />
     	<link rel="stylesheet" href="__ROOT__/Apps/Home/View/default/css/goodslist.css" />
     	<link rel="stylesheet" href="__ROOT__/Apps/Home/View/default/css/base.css" />
		<link rel="stylesheet" href="__ROOT__/Apps/Home/View/default/css/head.css" />	
   	</head>
   	<body>
		<include file="./Apps/Home/View/default/header_common.html" />
		<input id="c1Id" type="hidden" value="{$c1Id}"/>
		<input id="c2Id" type="hidden" value="{$c2Id}"/>
		<input id="c3Id" type="hidden" value="{$c3Id}"/>
		<input type="hidden" id="msort" value="{$msort}"/>   		
		<!----加载商品楼层start----->
		<div class="wst-container">
			<div class="wst-nvg-title">
				<a href="{:U('Home/Goods/getGoodsList/',array('c1Id'=>$goodsNav[0]['catId']))}">{$goodsNav[0]["catName"]}</a>
				<if condition="$goodsNav[1]['catId'] gt 0">
				&nbsp;>&nbsp;<a href="{:U('Home/Goods/getGoodsList/',array('c1Id'=>$goodsNav[0]['catId'],'c2Id'=>$goodsNav[1]['catId']))}">{$goodsNav[1]["catName"]}</a>
				</if>
				<if condition="$goodsNav[2]['catId'] gt 0">
				&nbsp;>&nbsp;<a href="{:U('Home/Goods/getGoodsList/',array('c1Id'=>$goodsNav[0]['catId'],'c2Id'=>$goodsNav[1]['catId'],'c3Id'=>$goodsNav[2]['catId']))}">{$goodsNav[2]["catName"]}</a>
				</if>
			</div>
			<!-------------商品筛选栏---------------->
			<div class="wst-goods-search" style="">
				<div class="search-title" style="">商品筛选</div>
				<div class="search-panel">
					<div class="search-box">
						<div class="search-items">
							<div class="items-title">配送区域：</div>
							<div id="wst-areas" class="items">
								<li id="city_0" <if condition="$areaId3 eq 0" >class="searched"</if> data="0" onClick="queryGoods(this,1);">全部</li>
								<volist name="districts" key="k" id="vo">
								<li id="city_{$vo['areaId']}" <if condition="$vo['areaId'] eq $areaId3" >class="searched"</if> data="{$vo['areaId']}" onClick="queryGoods(this,1);">{$vo["areaName"]}</li>
								</volist>
								<div class="wst-clear"></div>
							</div>
							<div class="wst-clear"></div>
						</div>
						<if condition="$areaId3 gt 0" >
						<div class="wst-area-country">
							<div id="wst-communitys" class="items">
								<li <if condition="$communityId eq 0" >class="searched"</if> data="0" onClick="queryGoods(this,2);">全部</li>
								<volist name="communitys" key="k" id="vo">
								<li id="community_{$vo['communityId']}" <if condition="$vo['communityId'] eq $communityId" >class="searched"</if> data="{$vo['communityId']}" onClick="queryGoods(this,2);">{$vo["communityName"]}</li>
								</volist>
								<div class="wst-clear"></div>
							</div>
							<div class="wst-clear"></div>
						</div>
						</if>
					</div>
				</div>
				<div class="search-panel">
					<div class="search-box">
						<div class="search-items">
							<div class="items-title">商品品牌：</div>
							<div id="wst-brand" class="items" >
								<div id="wst-brand-tp" onclick="tohide(this,'wst-brand');">&nbsp;显示&nbsp;</div>
								<li <if condition="$brandId eq 0" >class="searched"</if> data="0" onClick="queryGoods(this,3);">全部</li>
								<volist name="brands" id="vo">
								<li id="brand_{$vo['brandId']}" <if condition="$vo['brandId'] eq $brandId" >class="searched"</if> data="{$vo['brandId']}" onClick="queryGoods(this,3);">{$vo['brandName']}</li>
								</volist>
								<div class="wst-clear"></div>
							</div>
							<div class="wst-clear"></div>
						</div>
					</div>
				</div>
				<div class="search-panel">
					<div class="search-box">
						<div class="search-items">
							<div class="items-title">价格区间：</div>
							<div id="wst-price" class="items">
								<li <if condition="$priceId eq ''" >class="searched"</if> data="" onClick="queryGoods(this,4);">全部</li>
								<foreach  name="prices" key="key2" item="price">
								<li id="price_{$key2}" <eq name="key2" value="$priceId">class="searched"</eq> data="{$key2}" onClick="queryGoods(this,4);">{$price}元</li>
								</foreach >
								
								<div class="wst-clear"></div>
							</div>
							<div class="wst-clear"></div>
						</div>
					</div>
				</div>
				
			</div>
			<!-----------------------商品列表---------------------------->
			<div class="wst-goods-list">
				<div class="wst-goods-header">
					<li <if condition="$mark lt 6">class="licurr"</if> onclick="queryGoods(this,1);">综合排序<s <if condition="$msort eq 0">class="bscurr_up"<else/>class="bscurr"</if>></s></li>
					<li <if condition="$mark eq 6">class="licurr"</if> onclick="queryGoods(this,6);">人气<s <if condition="$msort eq 0">class="bscurr_up"<else/>class="bscurr"</if>></s></li>
					<li <if condition="$mark eq 7">class="licurr"</if> onclick="queryGoods(this,7);">销量<s <if condition="$msort eq 0">class="bscurr_up"<else/>class="bscurr"</if>></s></li>
					<li <if condition="$mark eq 8">class="licurr"</if> onclick="queryGoods(this,8);">价格<b <if condition="$msort eq 0">class="bscurr_up"<else/>class="bscurr"</if>></b></li>
					<li <if condition="$mark eq 9">class="licurr"</if> onclick="queryGoods(this,9);">好评度<s <if condition="$msort eq 0">class="bscurr_up"<else/>class="bscurr"</if>></s></li>
					<li <if condition="$mark eq 10">class="licurr"</if> onclick="queryGoods(this,10);">上架时间<s <if condition="$msort eq 0">class="bscurr_up"<else/>class="bscurr"</if>></s></li>
					<div style="float:left;position: relative;">
						&nbsp;&nbsp;&nbsp;&nbsp;
						<s class="rmb1"></s>
						<s class="rmb2"></s>
						<input type="text" class="wst-glist-price" id="sprice" value="{$sprice}"/>-
						<input type="text" class="wst-glist-price" id="eprice" value="{$eprice}"/>
						<button class="wst-glist-cofm" onclick="queryGoods(this,12);">确定</button>
					</div>
					<div class="wst-clear"></div>
				</div>
				<div class="wst-goods-page">
					<volist name="pages['root']" key="key" id="goods">
					<li class="wst-goods-item">
						<div class="goods-img">
							<a href="{:U('Home/Goods/getGoodsDetails/',array('goodsId'=>$goods['goodsId']))}">
							<img class='lazyImg' data-original="__ROOT__/{$goods['goodsThums']}" width="180" />
							</a>
						</div>
						<div class="goods-des">
							<div class="goods-title">
								<a href="{:U('Home/Goods/getGoodsDetails/',array('goodsId'=>$goods['goodsId']))}">{$goods['goodsName']}</a>
							</div>
							<div class="goods-price"><span class="span1" id="shopGoodsPrice_{$goods['goodsId']}" dataId="{$goods['goodsAttrId']}">￥{$goods['shopPrice']}</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="span2">￥{$goods['marketPrice']}</span></div>
							<div class="goods-buy">
								<div class="goods-left">
									<span style="color:green;font-weight:bolder;margin-left:2px;">{$goods["saleCount"]}</span>人已购买
								</div>
								<div class="goods-right">
								    <if condition="$goods['goodsStock'] gt 0">
								    	<a href="javascript:addCart({$goods['goodsId']},0,'{$goods['goodsThums']}')" class="btnCart">
										<img src="__ROOT__/Apps/Home/View/default/images/btn_addcart.png" width="85"/>
										</a>
									<else/>
									    &nbsp;&nbsp;&nbsp;&nbsp;<font color='red'>(暂无商品)</font>
									</if>
								</div>
								<div class="wst-clear"></div>
							</div>
						</div>
					</li>
					</volist>
					<div class="wst-clear"></div>
				</div>
			</div>
			<div class="wst-page" style="text-align:center;">
				<div id="wst-page-items"></div>
			</div>
			<div class="wst-clear"></div>
		</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script src="__PUBLIC__/plugins/layer/layer.min.js"></script>
	<script src="__ROOT__/Apps/Home/View/default/js/head.js" type="text/javascript"></script>
	<script src="__ROOT__/Apps/Home/View/default/js/common.js" type="text/javascript"></script>
	<script src="__ROOT__/Apps/Home/View/default/js/goods.js"></script>
	<script>
	<if condition="$bs eq 1">
		$("#wst-brand-tp").click();
	</if>
	<if condition="$pages['totalPage'] gt 1">
	
	laypage({
	    cont: 'wst-page-items',
	    pages: {$pages["totalPage"]}, //总页数
	    skip: true, //是否开启跳页
	    skin: '#e23e3d',
	    groups: 3, //连续显示分页数
	    curr: function(){ //通过url获取当前页，也可以同上（pages）方式获取
	        var page = location.search.match(/pcurr=(\d+)/);
	        return page ? page[1] : 1;
	    }(), 
	    jump: function(e, first){ //触发分页后的回调
	        if(!first){ //一定要加此判断，否则初始时会无限刷新
	        	var nuewurl = WST.splitURL("pcurr");
	        	var ulist = nuewurl.split("?");
	        	if(ulist.length>1){
	        		location.href = nuewurl+'&pcurr='+e.curr;
	        	}else{
	        		location.href = '?pcurr='+e.curr;
	        	}
	            
	        }
	    }
	});
	</if>
	
	</script>
		
		<include file="./Apps/Home/View/default/right_cart.html" />
		<include file="./Apps/Home/View/default/footer.html" />
   	</body>
</html> 